import requests
from config import url_cloud, headers_web


class StudentStudyLearningMaterialFiles:
    def __int__(self):
        self.url = url_cloud
        self.headers = headers_web

    @classmethod
    def post_studentlearningrecordpoint(cls, url_cloud: str, headers=headers_web, params=None, json=None,
                                        paramspath=None):
        """
        summary:"学生学习情况记录"
        description:"1.云课堂学生端"
        :param url_cloud:
        :param headers:
        :param params:
        :param json:
        :param paramspath:
        :return:
        """
        url = url_cloud + f"/teachinglaboratoryapi/v1/laboratorylearningmaterialfiles/{paramspath}/studentlearningrecordpoint"
        r = requests.post(url=url, headers=headers, params=params, json=json)
        return r


if __name__ == '__main__':
    params13 = {
        "validCode": "ebd1bfd3b8fa294742b1a13db425b7aa"
    }
    json13 = {
        "admittanceId": "ff80818189452f2e0189872a8d6f0474",
        "learningMaterialsInfoId": "ff80818189452f2e0189872a8e140482",
        "learningStatisticsId": "ff80818189452f2e0189872a8e000481",
        "learningStatus": 1,
        "learningTime": 1,
        "totalLearningTime": 1,
        "userId": "00C09721-3DA8-4D50-8E8C-2F2B0C25EF8E",
        "userName": "白姝颖",
        "userNo": "2017013676"
    }
    r = StudentStudyLearningMaterialFiles.post_studentlearningrecordpoint(url_cloud=url_cloud, params=params13,
                                                                          json=json13,
                                                                          paramspath="ff80818189452f2e0189872a8d800475")
    print(r.status_code)
